const { defineConfig } = require('@vue/cli-service')

// const path = require('path');//引入path模块
// function resolve(dir) {
//   return path.join(__dirname, dir)//path.join(__dirname)设置绝对路径
// }

module.exports = defineConfig({
  transpileDependencies: true,
  // publicPath: "./",
  devServer: {
    proxy: {
      '/api': {
        target: 'http://localhost:5002',
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          "^/api": '/'
        }
      },
      '/work': {
        target: 'http://www.heyongqiang.work:8081',
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          "^/work": '/'
        }
      }
    }
  }
})
